import { reactive } from 'vue';
import { defineStore } from "pinia";
import { dictionaryGroupType, treeType } from '@/types/project';

export const projectStore = defineStore("project", {
    state: () => {
        return {
            treeData: reactive<Array<treeType>>([]),
            /* 字典列表 */
            dictionary:[] as Array<dictionaryGroupType>
        };
    },
    persist: {
        enabled: true,
        strategies: [
            { storage: localStorage, }
        ],
    },
});
